#include <cstdio>

using namespace std;

int main_108()
{
    int num,K,left=1,right;
    scanf("%d %d",&num,&K);
    int sticks[num]= {0};
    scanf("%d",&right);
    sticks[0]=right;
    for (int i=1; i<num ; ++i )
    {
        scanf("%d",&sticks[i]);
        if (sticks[i]>right)
        {
            right=sticks[i];
        }
    }
    int mid,k;
    while (left<right)
    {
        mid=left+(right-left)/2;
        k=0;
        for (int i=0;i<num ; ++i)
        {
            k+=sticks[i]/mid;
        }
        if (k<K)
        {
            right=mid;
        }
        else
        {
            left=mid+1;
        }
    }
    printf("%d",mid-1);
    return 0;
}
